//
//  PopoAnimationViewController.m
//  OCDome
//
//  Created by 李含文 on 2020/10/12.
//  Copyright © 2020 李含文. All rights reserved.
//

#import "PopoAnimationViewController.h"
#import "HWCoverVerticalTransition.h"

@interface PopoAnimationViewController ()
@property (nonatomic, strong) HWCoverVerticalTransition *aniamtion;
@end

@implementation PopoAnimationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor.whiteColor colorWithAlphaComponent:1];
//
}
- (instancetype)init {
    self = [super init];
    if (self) {
        _aniamtion = [[HWCoverVerticalTransition alloc] initPresentViewController:self withRragDismissEnabal:YES];
//        _aniamtion.backgroundUserInteractionEnabled = NO; // 背景是否响应
        _aniamtion.coverBackgroundColor = [UIColor.blackColor colorWithAlphaComponent:0.4]; // 设置背景颜色
        self.preferredContentSize = CGSizeMake(self.view.bounds.size.width, 600); // 设置内容大小
        
        self.transitioningDelegate = _aniamtion;
    }
    return self;
}
- (void)viewWillLayoutSubviews {
    [super viewWillLayoutSubviews];
//    self.view.frame = CGRectMake(0, 0, self.view.bounds.size.width, 600);
}
@end
